package cn.fintecher.pangolin.entity.elastic;

import cn.fintecher.pangolin.common.enums.BaseSelect;
import cn.fintecher.pangolin.common.enums.FollowType;
import cn.fintecher.pangolin.common.utils.Constants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

import java.util.Date;
import java.util.List;

/**
 * @Auther: xiaqun
 * @Description: 催记实体
 * @Date: 19:01 2019/9/11
 */

@Data
@Document(indexName = Constants.CASE_FOLLOWUP_RECORD, type = Constants.CASE_FOLLOWUP_RECORD, shards = 1, replicas = 0)
@ApiModel(value = "催记实体", description = "催记实体")
public class CaseFollowupRecord {
    @Id
    @ApiModelProperty(value = "主键ID")
    private String id;

    @ApiModelProperty(value = "案件ID")
    private String caseId;

    @ApiModelProperty(value = "案件编号")
    private String caseNumber;

    @ApiModelProperty(value = "客户姓名")
    private String personalName;

    @ApiModelProperty(value = "委托方ID")
    private String principalId;

    @ApiModelProperty(value = "委托方名称")
    private String principalName;

    @ApiModelProperty(value = "证件号")
    private String certificateNo;

    @ApiModelProperty(value = "联络对象关系")
    private String relation;

    @ApiModelProperty(value = "联络对象姓名")
    private String name;

    @ApiModelProperty(value = "催记方式 0-自动 1-手动")
    private Integer collectionWay;

    @ApiModelProperty(value = "跟进方式")
    private FollowType type;

    @ApiModelProperty(value = "联络类型")
    private String contactType;

    @ApiModelProperty(value = "号码类型")
    private String phoneType;

    @ApiModelProperty(value = "联系电话")
    private String contactPhone;

    @ApiModelProperty(value = "号码状态")
    private String contactStatus;

    @ApiModelProperty(value = "联络结果")
    private String contactResult;

    @ApiModelProperty(value = "下次跟进日期")
    private Date follNextDate;

    @ApiModelProperty(value = "要点标记")
    private BaseSelect isImportant;

    @ApiModelProperty(value = "通话ID")
    private String callId;

    @ApiModelProperty(value = "外访员")
    private String outCollector;

    @ApiModelProperty(value = "地址类型")
    private String addrType;

    @ApiModelProperty(value = "地址状态")
    private String addrStatus;

    @ApiModelProperty(value = "详细地址")
    private String detail;

    @ApiModelProperty(value = "是否信息更新")
    private String isUpdate;

    @ApiModelProperty(value = "跟进内容")
    private String content;

    @ApiModelProperty(value = "承诺还款标识")
    private String promiseFlag;

    @ApiModelProperty(value = "承诺还款金额")
    private Double promiseAmt;

    @ApiModelProperty(value = "承诺还款日期")
    private Date promiseDate;

    @ApiModelProperty(value = "已还款金额")
    private Double payAmount;

    @ApiModelProperty(value = "已还款日期")
    private Date payDate;

    @ApiModelProperty(value = "跟进人ID")
    private String operatorId;

    @ApiModelProperty(value = "跟进人姓名")
    private String operatorName;

    @ApiModelProperty(value = "操作时间")
    private Date operateTime;

    @ApiModelProperty(value = "图片文件集合")
    private List<UploadFile> certificate;

    @ApiModelProperty(value = "录音文件集合")
    private List<UploadFile> record;

    @ApiModelProperty(value = "视频文件集合")
    private List<UploadFile> video;

    @ApiModelProperty(value = "录音文件url")
    private String url;

    public void process(String id, String name, Date date) {
        this.operatorId = id;
        this.operatorName = name;
        this.operateTime = date;
    }
}
